package com.paypal.android.a;

import android.util.Log;
import com.paypal.android.MEP.e;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Currency;
import java.util.Hashtable;
import java.util.Locale;

public final class j
{
  private static String[] a = { "de_at", "de_ch", "de_de", "en_ar", "en_at", "en_au", "en_be", "en_br", "en_ca", "en_ch", "en_de", "en_es", "en_fr", "en_gb", "en_hk", "en_in", "en_it", "en_jp", "en_mx", "en_nl", "en_pl", "en_sg", "en_tw", "en_us", "es_ar", "es_es", "es_mx", "fr_be", "fr_ca", "fr_ch", "fr_fr", "it_it", "ja_jp", "nl_be", "nl_nl", "pl_pl", "pt_br", "zh_hk", "zh_tw" };
  private static Hashtable b;
  private static NumberFormat c;
  private static Object d = new Object();

  public static String a(String paramString)
  {
    while (b == null)
      try
      {
        Log.d("StringUtil", "wait for _strings to be allocated");
        Thread.sleep(10L);
      }
      catch (InterruptedException localInterruptedException)
      {
      }
    while (true)
    {
      String str;
      synchronized (d)
      {
        str = (String)b.get(paramString);
        if (str == null)
          return paramString;
      }
      paramString = str;
    }
  }

  public static String a(String paramString, int paramInt)
  {
    String[] arrayOfString = paramString.substring(0, paramString.indexOf("T")).split("-");
    if (arrayOfString.length < 3)
      return "Error with timestamp.";
    int i = Integer.parseInt(arrayOfString[0]);
    int j = Integer.parseInt(arrayOfString[1]);
    int k = Integer.parseInt(arrayOfString[2]);
    String str = e.a().h();
    if ((str.contains("AU")) || (str.contains("DE")) || (str.contains("BR")) || (str.contains("FR")) || (str.contains("IN")) || (str.contains("NL")) || (str.contains("PL")) || (str.contains("ES")) || (str.contains("GB")) || (str.contains("AT")) || (str.contains("CH")) || (str.contains("MX")) || (str.contains("SG")) || (str.contains("IT")) || (str.contains("AR")))
      paramInt = 0;
    while (true)
      switch (paramInt)
      {
      default:
        return j + "/" + k + "/" + i;
        if (str.contains("US"))
          paramInt = 2;
        else if ((str.contains("BE")) || (str.contains("CA")) || (str.contains("JP")) || (str.contains("HK")) || (str.contains("TW")))
          paramInt = 5;
        break;
      case 0:
      case 5:
      }
    return k + "/" + j + "/" + i;
    return i + "/" + j + "/" + k;
  }

  public static String a(BigDecimal paramBigDecimal, String paramString)
  {
    c.setCurrency(Currency.getInstance(paramString));
    String str = c.format(paramBigDecimal);
    return str + " (" + paramString + ")";
  }

  public static boolean b(String paramString)
  {
    String str = paramString.toLowerCase();
    if ((str.indexOf('_') == -1) || (str.length() != 5) || (!g(str.substring(0, 1))) || (!g(str.substring(3, 5))));
    while (true)
    {
      return false;
      for (int i = 0; i < a.length; i++)
        if (a[i].equals(str))
          return true;
    }
  }

  public static void c(String paramString)
  {
    int i = 17877;
    Object localObject1 = d;
    if (paramString == null)
      paramString = "en_US";
    while (true)
    {
      String str1;
      int k;
      try
      {
        str1 = paramString.toLowerCase();
        if (b(str1))
          break label1046;
        str2 = "en_US";
        if (b != null)
          b = null;
        c = (DecimalFormat)DecimalFormat.getCurrencyInstance(Locale.getDefault());
        if (str2.equals("de_at"))
        {
          i = 407851;
          j = 19844;
          String[] arrayOfString1 = new String(i.a(i, j, i.a("com/paypal/android/utils/data/locale.bin"))).split("\n");
          b = new Hashtable();
          k = 0;
          if (k < arrayOfString1.length)
          {
            String str3 = arrayOfString1[k];
            if (!str3.contains("\" = \""))
              break label1053;
            String[] arrayOfString2 = str3.split("\" = \"");
            String str4 = arrayOfString2[0].replace('"', ' ').trim();
            String str5 = arrayOfString2[1].replace("\";", " ").trim();
            b.put(str4, str5);
            break label1053;
          }
        }
        else
        {
          if (str2.equals("de_ch"))
          {
            j = 19922;
            continue;
          }
          if (str2.equals("de_de"))
          {
            i = 367816;
            j = 19844;
            continue;
          }
          if (str2.equals("en_ar"))
          {
            i = 57219;
            j = 19391;
            continue;
          }
          if (str2.equals("en_at"))
          {
            i = 175128;
            j = 20185;
            continue;
          }
          if (str2.equals("en_au"))
          {
            i = 563442;
            j = 18501;
            continue;
          }
          if (str2.equals("en_be"))
          {
            i = 742893;
            j = 19328;
            continue;
          }
          if (str2.equals("en_br"))
          {
            i = 135958;
            j = 19762;
            continue;
          }
          if (str2.equals("en_ca"))
          {
            i = 683782;
            j = 21569;
            continue;
          }
          if (str2.equals("en_ch"))
          {
            i = 523349;
            j = 20439;
            continue;
          }
          if (str2.equals("en_de"))
          {
            i = 95688;
            j = 20185;
            continue;
          }
          if (str2.equals("en_es"))
          {
            i = 705351;
            j = 19362;
            continue;
          }
          if (str2.equals("en_fr"))
          {
            i = 309212;
            j = 20370;
            continue;
          }
          if (str2.equals("en_gb"))
          {
            i = 487773;
            j = 18217;
            continue;
          }
          if (str2.equals("en_hk"))
          {
            i = 505990;
            j = 17359;
            continue;
          }
          if (str2.equals("en_in"))
          {
            i = 329582;
            j = 18162;
            continue;
          }
          if (str2.equals("en_it"))
          {
            i = 543788;
            j = 19654;
            continue;
          }
          if (str2.equals("en_jp"))
          {
            i = 427695;
            j = 23230;
            continue;
          }
          if (str2.equals("en_mx"))
          {
            i = 155720;
            j = 19408;
            continue;
          }
          if (str2.equals("en_nl"))
          {
            i = 468459;
            j = 19314;
            continue;
          }
          if (str2.equals("en_pl"))
          {
            i = 581943;
            j = 20507;
            continue;
          }
          if (str2.equals("en_sg"))
          {
            i = 195313;
            j = 18176;
            continue;
          }
          if (str2.equals("en_tw"))
          {
            j = i;
            i = 0;
            continue;
          }
          if (str2.equals("en_us"))
          {
            i = 724713;
            j = 18180;
            continue;
          }
          if (str2.equals("es_ar"))
          {
            i = 251927;
            j = 19188;
            continue;
          }
          if (str2.equals("es_es"))
          {
            i = 76610;
            j = 19078;
            continue;
          }
          if (str2.equals("es_mx"))
          {
            i = 271115;
            j = 19157;
            continue;
          }
          if (str2.equals("fr_be"))
          {
            i = 347744;
            j = 20072;
            continue;
          }
          if (str2.equals("fr_ca"))
          {
            i = 230568;
            j = 21359;
            continue;
          }
          if (str2.equals("fr_ch"))
          {
            i = 115873;
            j = 20085;
            continue;
          }
          if (str2.equals("fr_fr"))
          {
            i = 663766;
            j = 20016;
            continue;
          }
          if (str2.equals("it_it"))
          {
            i = 37799;
            j = 19420;
            continue;
          }
          if (str2.equals("ja_jp"))
          {
            i = 640855;
            j = 22911;
            continue;
          }
          if (str2.equals("nl_be"))
          {
            i = 602450;
            j = 18954;
            continue;
          }
          if (str2.equals("nl_nl"))
          {
            i = 290272;
            j = 18940;
            continue;
          }
          if (str2.equals("pl_pl"))
          {
            i = 387660;
            j = 20191;
            continue;
          }
          if (str2.equals("pt_br"))
          {
            i = 621404;
            j = 19451;
            continue;
          }
          if (str2.equals("zh_hk"))
          {
            i = 213489;
            j = 17079;
            continue;
          }
          if (!str2.equals("zh_tw"))
            break label1038;
          i = 450925;
          j = 17534;
          continue;
        }
        return;
      }
      finally
      {
      }
      label1038: int j = 0;
      i = 0;
      continue;
      label1046: String str2 = str1;
      continue;
      label1053: k++;
    }
  }

  public static boolean d(String paramString)
  {
    int i = paramString.indexOf('@');
    int j = paramString.lastIndexOf('.');
    return (i != -1) && (j != -1) && (j - 1 > i) && (j != -1 + paramString.length());
  }

  public static boolean e(String paramString)
  {
    int i = paramString.length();
    boolean bool1 = false;
    if (i > 0)
    {
      StringBuffer localStringBuffer = new StringBuffer(paramString.length());
      for (int j = 0; j < paramString.length(); j++)
      {
        char c1 = paramString.charAt(j);
        if (((c1 >= '0') && (c1 <= '9')) || (c1 == '+'))
          localStringBuffer.append(c1);
      }
      boolean bool2 = paramString.equals(localStringBuffer.toString());
      bool1 = false;
      if (bool2)
        bool1 = true;
    }
    return bool1;
  }

  public static boolean f(String paramString)
  {
    for (int i = 0; i < paramString.length(); i++)
    {
      int j = paramString.charAt(i);
      if ((j < 48) || (j > 57))
        return false;
    }
    return true;
  }

  private static boolean g(String paramString)
  {
    for (int i = 0; i < paramString.length(); i++)
    {
      int j = paramString.charAt(i);
      if (((j < 97) || (j > 122)) && ((j < 65) || (j > 90)) && ((j < 48) || (j > 57)))
        return false;
    }
    return true;
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.paypal.android.a.j
 * JD-Core Version:    0.6.2
 */